package com.wxl.common.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.wxl.common.R
import com.wxl.common.bean.BannerBean
import com.wxl.common.util.ImgLoader

/**
 * create file time : 2021/3/2
 * create user : wxl
 * subscribe :
 */
class MainHomeClassAdapter : BaseQuickAdapter<BannerBean, BaseViewHolder> {


    constructor(data: List<BannerBean>) : super(R.layout.item_home_class_layout, data)

    override fun convert(helper: BaseViewHolder, item: BannerBean?) {
        item?.let {
            ImgLoader.load(helper.getView(R.id.mainHomeClassItemImg),item.xBannerUrl as String,R.drawable.shape_cricle_gray)
            helper.setText(R.id.mainHomeClassItemText,item.title)
        }
    }
}